<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title></title>
    <meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
    <!-- Loading Bootstrap -->
    <link href="Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
    <!-- Loading Flat UI -->
    <link href="Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
    <link rel="shortcut icon" href="Public/Admin/Flat/img/favicon.ico">
    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
    <!--[if lt IE 9]>
    <script src="dist/js/vendor/html5shiv.js"></script>
    <script src="dist/js/vendor/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="alert alert-success">管理员列表</div>
<table class="table table-hover">
    <tr>
        <th width="30">aid</th>
        <th>用户名</th>
        <th>邮箱</th>
        <th>状态</th>
        <th width="150">登录时间</th>
        <th>登陆ip</th>
        <th>权限</th>
        <th width="210">操作</th>
    </tr>
    {{foreach from="$adminData" value="$v"}}
    <tr>
        <td>{{$v['aid']}}</td>
        <td>{{$v['username']}}</td>
        <td>{{$v['email']}}</td>
        <td>{{if value="$v['status']==1"}}在线{{else}}离线{{endif}}</td>
        <td>{{date("Y/m/d H:i:s",$v['time'])}}</td>
        <td>{{$v['loginip']}}</td>
        <td>{{if value="$v['username']!='admin'"}}
                <a  href="{{U('authority',array('aid'=>$v['aid']))}}" class="btn btn-sm btn-warning">管理权限</a>
           {{else}}
            <a  href="javascript:;">不可修改！</a>
           {{endif}}
            </td>
        {{if value="$v['username']!='admin'"}}
        <td>
            <a href="javascript:if(confirm('确认删除吗？')) location.href='{{U('deluser',array('aid'=>$v['aid']))}}';" class="btn btn-sm btn-danger">删除</a>
        </td>
        {{else}}
        <td>
            <a href="javascript:;">不能操作！</a>
        </td>
        {{endif}}
    </tr>
    {{endforeach}}
</table>
<a href="{{U('addauser')}}" class="btn btn-primary btn-block">添加新管理员</a>

</body>
</html>